package bb.lanxing.lib.devices.core.provider;

import bb.lanxing.lib.devices.api.provider.BatteryProvider;
import bb.lanxing.lib.devices.api.provider.CadenceProvider;
import bb.lanxing.lib.devices.api.provider.HeartRateProvider;
import bb.lanxing.lib.devices.api.provider.PowerRateProvider;
import bb.lanxing.lib.devices.api.provider.BikeTrainerProvider;
import bb.lanxing.lib.devices.api.provider.IndoorBikeProvider;
import bb.lanxing.lib.devices.api.provider.CrossTrainerProvider;
import bb.lanxing.lib.devices.api.provider.RowerProvider;
import bb.lanxing.lib.devices.api.provider.IndoorBikeDataDispatcher;
import bb.lanxing.lib.devices.api.provider.PressureProvider;
import bb.lanxing.lib.devices.api.provider.SpeedProvider;
import bb.lanxing.lib.devices.api.provider.TemperatureProvider;
//import bb.lanxing.lib.kt.model.BikeTrainerData;

//import android.util.Log;
public class DataNotifier {
    public static void notifyRawCadenceData(int i, int i2, int i3) {
        CadenceProvider cadenceProvider = DataProviders.getCadenceProvider();
        if (cadenceProvider instanceof CadenceProviderImpl) {
            ((CadenceProviderImpl) cadenceProvider).notifyRawCadenceData(i, i2, i3);
        }
    }

    public static void notifyCalculatedCadenceData(int i, int i2) {
        CadenceProvider cadenceProvider = DataProviders.getCadenceProvider();
        if (cadenceProvider instanceof CadenceProviderImpl) {
            ((CadenceProviderImpl) cadenceProvider).notifyCalculatedCadenceData(i, i2);
        }
    }

    public static void notifyHeartrateData(int i, String str, int i2) {
        HeartRateProvider heartrateProvider = DataProviders.getHeartrateProvider();
        if (heartrateProvider instanceof HeartRateProviderImpl) {
            ((HeartRateProviderImpl) heartrateProvider).notifyHeartrateData(i, str, i2);
        }
    }


    public static void notifyPowerrateData(int i, String str, int i2) {
        PowerRateProvider powerrateProvider = DataProviders.getPowerrateProvider();
        if (powerrateProvider instanceof PowerRateProviderImpl) {
            ((PowerRateProviderImpl) powerrateProvider).notifyPowerrateData(i, str, i2);
        }
    }

    public static void notifyBiketrainerData(int i, String str, int i2, int i3,int i4) {
        BikeTrainerProvider biketrainerProvider = DataProviders.getBiketrainerProvider();
        if (biketrainerProvider instanceof BikeTrainerProviderImpl) {
            ((BikeTrainerProviderImpl) biketrainerProvider).notifyBiketrainerData(i, str, i2, i3,i4);
        }
    }
    public static void notifyIndoorbikeData(int i, String str, double i2,int i3,int i4, int i5, int i6, double i7,int i8) {
        IndoorBikeProvider indoorbikeProvider = DataProviders.getIndoorbikeProvider();
        if (indoorbikeProvider instanceof IndoorBikeProviderImpl) {
            ((IndoorBikeProviderImpl) indoorbikeProvider).notifyIndoorbikeData(i, str, i2, i3, i4, i5, i6,i7, i8);
        }
    }
    public static void notifyCrosstrainerData(int i, String str, double i2,double i3,int i4, int i5, int i6, int i7, int i8) {
        CrossTrainerProvider crosstrainerProvider = DataProviders.getCrosstrainerProvider();
        if (crosstrainerProvider instanceof CrossTrainerProviderImpl) {
            ((CrossTrainerProviderImpl) crosstrainerProvider).notifyCrosstrainerData(i, str, i2, i3, i4, i5, i6,i7 ,i8);
        }
    }

    public static void notifyRowerData(int i, String str, int i2,int i3,int i4, double i5, double i6, int i7, int i8,int i9) {
        RowerProvider rowerProvider = DataProviders.getRowerProvider();
        if (rowerProvider instanceof RowerProviderImpl) {
            ((RowerProviderImpl) rowerProvider).notifyRowerData(i, str, i2, i3, i4, i5, i6,i7 ,i8,i9);
        }
    }

    public static void notifyBatteryData(int i, String str, int i2) {
        BatteryProvider batteryProvider = DataProviders.getBatteryProvider();
        if (batteryProvider instanceof BatteryProviderImpl) {
            ((BatteryProviderImpl) batteryProvider).notifyBatteryChange(i, str, i2);
        }
    }

    public static void notifyHeartrateBeltInit(boolean z, int i) {
        HeartRateProvider heartrateProvider = DataProviders.getHeartrateProvider();
        if (heartrateProvider instanceof HeartRateProviderImpl) {
            ((HeartRateProviderImpl) heartrateProvider).notifyHeartrateBeltInit(z, i);
        }
    }

    public static void notifyHeartrateBeltCloseWarn(boolean z) {
        HeartRateProvider heartrateProvider = DataProviders.getHeartrateProvider();
        if (heartrateProvider instanceof HeartRateProviderImpl) {
            ((HeartRateProviderImpl) heartrateProvider).notifyHeartrateBeltCloseWarn(z);
        }
    }

    public static void notifyHeartrateBeltSetStatus(boolean z) {
        HeartRateProvider heartrateProvider = DataProviders.getHeartrateProvider();
        if (heartrateProvider instanceof HeartRateProviderImpl) {
            ((HeartRateProviderImpl) heartrateProvider).notifyHeartrateBeltSetStatus(z);
        }
    }

    public static void notifyPressureData(int i, int i2) {
        PressureProvider pressureProvider = DataProviders.getPressureProvider();
        if (pressureProvider instanceof PressureProviderImpl) {
            ((PressureProviderImpl) pressureProvider).notifyPressureData(i, i2);
        }
    }

    public static void notifyRawSpeedCadenceData(int i, int i2, int i3) {
        SpeedProvider speedProvider = DataProviders.getSpeedProvider();
        if (speedProvider instanceof SpeedProviderImpl) {
            ((SpeedProviderImpl) speedProvider).notifyRawSpeedData(i, i2, i3);
        }
    }

    public static void notifyCalculatedSpeedData(int i, int i2) {
        SpeedProvider speedProvider = DataProviders.getSpeedProvider();
        if (speedProvider instanceof SpeedProviderImpl) {
            ((SpeedProviderImpl) speedProvider).notifyCalculatedSpeedData(i, i2);
        }
    }

    public static void notifyTemperatureData(int i, int i2) {
        TemperatureProvider temperatureProvider = DataProviders.getTemperatureProvider();
        if (temperatureProvider instanceof TemperatureProviderImpl) {
            ((TemperatureProviderImpl) temperatureProvider).notifyTemperatureData(i, i2);
        }
    }

    public static void notifyIndoorBikeData(Boolean bool, Boolean bool2, Boolean bool3, Boolean bool4, Boolean bool5, Boolean bool6, Boolean bool7, Boolean bool8, Boolean bool9, Boolean bool10, Boolean bool11, Boolean bool12, Boolean bool13, String str, Double d, Double d2, Double d3, Double d4, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, Double d5, int i9, int i10) {
        IndoorBikeDataDispatcher indoorBikeDispatcher = DataProviders.getIndoorBikeDispatcher();
        if (indoorBikeDispatcher instanceof IndoorBikeDataDispatcherImpl) {
            ((IndoorBikeDataDispatcherImpl) indoorBikeDispatcher).notifyData(bool, bool2, bool3, bool4, bool5, bool6, bool7, bool8, bool9, bool10, bool11, bool12, bool13, str, d, d2, d3, d4, i, i2, i3, i4, i5, i6, i7, i8, d5, i9, i10);
        }
    }
}
